<ion-view cache-view="false" hide-back-button="true" title="今日打折">
  <ion-nav-buttons side="left">
    <a class="button button-clear" ui-sref="dash.home">
      <i class="icon ion-chevron-left"></i>
    </a>
  </ion-nav-buttons>
  <ion-content>
    <div class="divider"></div>
    <ul class="list">

      <li class="item row" ng-click="changeToGoods(goods)" ng-repeat="goods in goodslist">
        <div class="col col-33">
          <img alt="" ng-if="!goods.smimgurl" ng-src="img/hd/file.png" style="width: 100%">
          <img alt="" ng-if="goods.smimgurl" ng-src="{{goods.smimgurl}}" style="width: 100%">
        </div>
        <div class="col">
          <div class="goods-name" style="margin-top: 8px; padding-left: 5px">
            {{goods.name}}
            {{goods.scale}}
          </div>
          <div>
            <div style="margin-top: 13px;">
              <div style="float: left; white-space: nowrap;">
                <b class="main-color" style="float: left;">{{goods.cx_price}}
                  <span style="font-size: 12px">元</span>
                </b>
                <del style="float: left;font-size: 12px; color: #aaa">{{goods.sc_price}}
                  <span style="font-size: 10px">元</span>
                </del>
                <div style="clear: both"></div>
              </div>
              <div style="float: right; margin-top: -10px">
                <button class="button main-background main-btn" name="button" ng-click="addCart(goods); $event.stopPropagation();" ng-if="goods.amount > 0" style="width: 100px;" type="button">加入购物车</button>
                <button class="button main-btn" disabled="disabled" name="button" ng-if="goods.amount <= 0" style="width: 100px;" type="button">已售完</button>
              </div>
              <div style="clear:both"></div>
            </div>
          </div>
        </div>
      </li>
      <li class="item item-divider " style="text-align: center">
        没有更多商品
      </li>
    </ul>
  </ion-content>

  <div class="mycart" ui-sref-opts="{reload: true}" ui-sref="order.cart">
    <div class="button button-icon icon ion-android-cart" style="color: #fff; background-color: rgba(0,0,0,0.5); width: 50px; height: 40px;border-radius: 10px;"></div>
    <span class="cart-count" ng-hide="!count ||count == 0">{{count}}</span>
  </div>
</ion-view>
